package main;

public class TextBuilder extends Builder{
    private final StringBuffer buff = new StringBuffer();
    @Override
    public void buildTitle(String title) {
        buff.append("================================").append("\n");
        buff.append("【").append(title).append("】").append("\n");
    }

    @Override
    public void buildString(String str) {
        buff.append(str).append("\n");
    }

    @Override
    public void buildItems(String[] items) {
        for (String item : items) {
            buff.append(" ·").append(item).append("\n");
        }
    }

    @Override
    public void buildDown() {
        buff.append("================================").append("\n");
    }

    public String getResult(){
        return buff.toString();
    }
}
